namespace thisDirection {
    //! 箭头函数
    class MyClass {
        name = "MyClases";


        // getName = () => {
        //     return this.name;
        // };
        getName = function (this: MyClass) {
            console.log(this)
            return this.name;
        };
    }

    const cs = new MyClass();
    const obje = {
        name: "obj",
        getName: cs.getName,
    };

    // Prints "obj", not "MyClass"
    console.log(obje.getName());
}

